package com.wisely.ch8_3.dao;

import com.wisely.ch8_3.domain.Person;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource;

/**
 * Created by thor on 17-3-22.
 */
@RepositoryRestResource(path = "people")
public interface PersonRepository extends JpaRepository<Person, Long> {
  @RestResource(path = "nameStartsWith", rel = "nameStartsWith")
  Person findByNameStartsWith(String name);
}
